$OpenBSD: patch-base_unix-gcc_mak,v 1.11 2015/04/06 21:04:30 ajacoutot Exp $
--- base/unix-gcc.mak.orig	Thu Feb 14 08:58:13 2013
+++ base/unix-gcc.mak	Tue Sep 17 20:59:54 2013
@@ -32,6 +32,7 @@ PSLIBDIR=./lib
 PSRESDIR=./Resource
 PSGENDIR=./$(BUILDDIRPREFIX)obj
 PSOBJDIR=./$(BUILDDIRPREFIX)obj
+CONTRIBDIR=./contrib
 
 # Do not edit the next group of lines.
 
@@ -70,12 +71,12 @@ gsincludedir = $(includedir)/ghostscript/
 
 docdir=$(gsdatadir)/doc
 exdir=$(gsdatadir)/examples
-GS_DOCDIR=$(docdir)
+GS_DOCDIR=$(TRUEPREFIX)/share/ghostscript/$(GS_DOT_VERSION)/doc
 
 # Define the default directory/ies for the runtime
 # initialization, resource and font files.  Separate multiple directories with a :.
 
-GS_LIB_DEFAULT=$(gsdatadir)/Resource/Init:$(gsdatadir)/lib:$(gsdatadir)/Resource/Font:$(gsdir)/fonts
+GS_LIB_DEFAULT=$(TRUEPREFIX)/share/ghostscript/$(GS_DOT_VERSION)/Resource/Init:$(TRUEPREFIX)/share/ghostscript/$(GS_DOT_VERSION)/lib:$(TRUEPREFIX)/share/ghostscript/$(GS_DOT_VERSION)/Resource/Font:$(TRUEPREFIX)/share/fonts/ghostscript
 
 # Define whether or not searching for initialization files should always
 # look in the current directory first.  This leads to well-known security
@@ -208,6 +209,9 @@ IJS_NAME=
 IJSSRCDIR=ijs
 IJSEXECTYPE=unix
 
+SHARED_IJS=0
+IJS_NAME=ijs
+
 # Define how to build the library archives.  (These are not used in any
 # standard configuration.)
 
@@ -219,7 +223,7 @@ RANLIB=ranlib
 
 # Define the name of the C compiler.
 
-CC=gcc
+#CC=gcc
 
 # Define the name of the linker for the final link step.
 # Normally this is the same as the C compiler.
@@ -231,7 +235,7 @@ CCLD=$(CC)
 # the 2.7.0-2.7.2 optimizer bug, either "-Dconst=" or
 # "-Wcast-qual -Wwrite-strings" is automatically included.
 
-GCFLAGS=-Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-builtin -fno-common
+GCFLAGS=-Wall -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -fno-common
 
 # Define the added flags for standard, debugging, profiling 
 # and shared object builds.
@@ -333,7 +337,7 @@ SOC_LOADER=dxmainc.c
 
 # Choose the language feature(s) to include.  See gs.mak for details.
 
-FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev $(PSD)fapi.dev
+FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)epsf.dev $(GLD)pipe.dev
 #FEATURE_DEVS=$(PSD)psl3.dev $(PSD)pdf.dev
 # The following is strictly for testing.
 FEATURE_DEVS_ALL=$(PSD)psl3.dev $(PSD)pdf.dev $(PSD)dpsnext.dev $(PSD)ttfont.dev $(PSD)rasterop.dev $(PSD)double.dev $(PSD)trapping.dev $(PSD)stocht.dev $(GLD)pipe.dev
@@ -371,8 +375,6 @@ DISPLAY_DEV=
 # Choose the device(s) to include.  See devs.mak for details,
 # devs.mak and contrib.mak for the list of available devices.
 
-DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.dev $(DD)x11cmyk.dev $(DD)x11gray2.dev $(DD)x11gray4.dev $(DD)x11mono.dev
-
 #DEVICE_DEVS1=
 #DEVICE_DEVS2=
 #DEVICE_DEVS3=
@@ -394,36 +396,18 @@ DEVICE_DEVS=$(DISPLAY_DEV) $(DD)x11.dev $(DD)x11alpha.
 #DEVICE_DEVS19=
 #DEVICE_DEVS20=
 
-DEVICE_DEVS1=$(DD)bmpmono.dev $(DD)bmpgray.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16.dev $(DD)bmp256.dev $(DD)bmp16m.dev $(DD)bmp32b.dev $(DD)stcolor.dev
-DEVICE_DEVS2=$(DD)epson.dev $(DD)eps9high.dev $(DD)eps9mid.dev $(DD)epsonc.dev $(DD)ibmpro.dev
-DEVICE_DEVS3=$(DD)deskjet.dev $(DD)djet500.dev $(DD)laserjet.dev $(DD)ljetplus.dev $(DD)ljet2p.dev $(DD)ljet3.dev $(DD)ljet3d.dev $(DD)ljet4.dev $(DD)ljet4d.dev $(DD)lj5mono.dev $(DD)lj5gray.dev
-DEVICE_DEVS4=$(DD)cdeskjet.dev $(DD)cdjcolor.dev $(DD)cdjmono.dev $(DD)cdj550.dev $(DD)pj.dev $(DD)pjxl.dev $(DD)pjxl300.dev
-DEVICE_DEVS5=$(DD)uniprint.dev $(DD)ijs.dev
-DEVICE_DEVS6=$(DD)bj10e.dev $(DD)bj200.dev $(DD)bjc600.dev $(DD)bjc800.dev
-DEVICE_DEVS7=$(DD)faxg3.dev $(DD)faxg32d.dev $(DD)faxg4.dev
-DEVICE_DEVS8=$(DD)pcxmono.dev $(DD)pcxgray.dev $(DD)pcx16.dev $(DD)pcx256.dev $(DD)pcx24b.dev $(DD)pcxcmyk.dev
-DEVICE_DEVS9=$(DD)pbm.dev $(DD)pbmraw.dev $(DD)pgm.dev $(DD)pgmraw.dev $(DD)pgnm.dev $(DD)pgnmraw.dev $(DD)pnm.dev $(DD)pnmraw.dev $(DD)ppm.dev $(DD)ppmraw.dev $(DD)pkm.dev $(DD)pkmraw.dev $(DD)pksm.dev $(DD)pksmraw.dev
-DEVICE_DEVS10=$(DD)tiffcrle.dev $(DD)tiffg3.dev $(DD)tiffg32d.dev $(DD)tiffg4.dev $(DD)tifflzw.dev $(DD)tiffpack.dev
-DEVICE_DEVS11=$(DD)tiff12nc.dev $(DD)tiff24nc.dev $(DD)tiff48nc.dev $(DD)tiffgray.dev $(DD)tiff32nc.dev $(DD)tiff64nc.dev $(DD)tiffsep.dev $(DD)tiffsep1.dev $(DD)tiffscaled.dev $(DD)tiffscaled8.dev $(DD)tiffscaled24.dev
-DEVICE_DEVS12=$(DD)psmono.dev $(DD)psgray.dev $(DD)psrgb.dev $(DD)bit.dev $(DD)bitrgb.dev $(DD)bitcmyk.dev
-DEVICE_DEVS13=$(DD)pngmono.dev $(DD)pngmonod.dev $(DD)pnggray.dev $(DD)png16.dev $(DD)png256.dev $(DD)png16m.dev $(DD)pngalpha.dev
-DEVICE_DEVS14=$(DD)jpeg.dev $(DD)jpeggray.dev $(DD)jpegcmyk.dev
-DEVICE_DEVS15=$(DD)pdfwrite.dev $(DD)pswrite.dev $(DD)ps2write.dev $(DD)epswrite.dev $(DD)txtwrite.dev $(DD)pxlmono.dev $(DD)pxlcolor.dev
-DEVICE_DEVS16=$(DD)bbox.dev $(DD)inkcov.dev
-
-DEVICE_DEVS17=$(DD)plan.dev $(DD)planm.dev $(DD)plang.dev $(DD)planc.dev $(DD)plank.dev
-
-DEVICE_DEVS18=
-DEVICE_DEVS19=
-DEVICE_DEVS20=$(DD)cljet5.dev $(DD)cljet5c.dev $(DD)pamcmyk32.dev $(DD)pamcmyk4.dev
-DEVICE_DEVS21=$(DD)spotcmyk.dev $(DD)devicen.dev $(DD)xcf.dev $(DD)bmpsep1.dev $(DD)bmpsep8.dev $(DD)bmp16m.dev $(DD)bmp32b.dev $(DD)psdcmyk.dev $(DD)psdrgb.dev
-
 # Shared library target to build.
 # Note that the two vga devices are Linux specific, and requires svgalib
 # We also don't do X modularized because modularization on Mac OS X doesn't work.
 GS_SHARED_OBJS=
 #GS_SHARED_OBJS=$(GLOBJDIR)/X11.so $(GLOBJDIR)/lvga256.so $(GLOBJDIR)/vgalib.so
 
+# Formerly copied from Makefile.in -- still needed?
+EXTRA_INIT_FILES= Fontmap cidfmap xlatmap FAPI FCOfontmap-PCLPS2 gs_cet.ps
+ 
+# Copied from Makefile.in -- still needed?
+CCAUX_=$(CCAUX) $(CFLAGS)
+CUPS_CC=$(CC)
 
 # ---------------------------- End of options --------------------------- #
 
@@ -472,7 +456,7 @@ include $(GLSRCDIR)/zlib.mak
 include $(GLSRCDIR)/png.mak
 include $(GLSRCDIR)/tiff.mak
 include $(GLSRCDIR)/jbig2.mak
-include $(GLSRCDIR)/lcms.mak
+include $(GLSRCDIR)/lcms2.mak
 include $(GLSRCDIR)/ijs.mak
 include $(GLSRCDIR)/devs.mak
 include $(GLSRCDIR)/contrib.mak
@@ -481,6 +465,8 @@ include $(GLSRCDIR)/unixlink.mak
 include $(GLSRCDIR)/unix-dll.mak
 include $(GLSRCDIR)/unix-end.mak
 include $(GLSRCDIR)/unixinst.mak
+include contrib/contrib.mak
+include cups/cups.mak
 
 # This has to come last so it won't be taken as the default target.
 $(AK):
